export function debounce(fun, time) {
    let timer = null
    return function () {
        if (timer) {
            clearInterval(timer)
        }
        timer = setInterval(() => {
            fun()
        }, time)
    }
}